import axios from 'axios';

// 获取轮播图
export const getBanner = () => axios.get('/banner?type=1');
// 推荐歌单
export const getTuijiangedan = (num) => axios.get(`/personalized?limit=${num}`);
// 推荐mv(首页)
export const getTuijianmv = () => axios.get('/personalized/mv');
// 推荐歌曲(首页)
export const getTuijiansong = () => axios.get('/personalized/newsong');
// 获取排行榜
export const getPaihang = () => axios.get(`/toplist`);
// 歌单分类
export const getGedanfenlei = () => axios.get('/playlist/hot');
// 获取歌单所有歌曲id
export const getGedanxiangqingId = (id) => axios.get(`/playlist/detail?id=${id}`);
// 获取歌单音乐
export const getGedanxiangqing = (ids) => axios.get(`/song/detail?ids=${ids}`);
// 最新歌曲(最新歌曲页)
export const getZuixinsong = (type) => axios.get(`/top/song?type=${type}`);
// 获取mv播放地址
export const getMvUrl = (id) => axios.get(`/mv/url?id=${id}`);
// 获取mv详细信息
export const getMvxiangqing = (id) => axios.get(`/mv/detail?mvid=${id}`);
// 获取相关mv
export const getXiangsiMv = (id) => axios.get(`/simi/mv?mvid=${id}`);
// 获取热门歌手
export const getRemengeshou = (type) => axios.get(`/toplist/artist?type=${type}`);
// 获取歌手歌曲
export const getGeshouMusic = (id, limit, offset) => axios.get(`/artist/songs?id=${id}&limit=${limit}&offset=${offset}`);
// 最新mv(最新mv页)
export const getZuixinMv = (area, type, order, limit, offset) => axios.get(`/mv/all?area=${area}&type=${type}&order=${order}&limit=${limit}&offset=${offset}`);
// 歌单分类对应内容
export const getGedanneirong = (tag, limit, offset) => axios.get(`/top/playlist?cat=${tag}&limit=${limit}&offset=${offset}`);
// 获取歌手详情
export const getGeshouDetail = (id) => axios.get(`/artist/detail?id=${id}`);
// 热搜列表
export const getResouliebiao = () => axios.get('/search/hot');
// 获取相关歌单
export const getXiangsiGedan = (id) => axios.get(`/related/playlist?id=${id}`);
// 获取音乐播放地址
export const getGequurl = (id) => axios.get(`/song/url?id=${id}`);
// 获取歌曲详情
export const getGequDetail = (id) => axios.get(`/song/detail?ids=${id}`);
// 获取相似音乐
export const getXiangsiGeqv = (id) => axios.get(`/simi/song?id=${id}`);
// 获取歌曲相关歌单
export const getXiangguanGeDan = (id) => axios.get(`/simi/playlist?id=${id}`);
// 获取歌词
export const getGeci = (id) => axios.get(`/lyric?id=${id}`);
// 搜索
export const search = (keywords, limit, offset, type) => axios.get(`/search?keywords=${keywords}&limit=${limit}&offset=${offset}&type=${type}`);